/******************************************
 *Author:庄育龙
 *Function:棋盘的绘图事件与对鼠标事件的响应
 *Created Date:2013.05.14
 *Last Modified:2013.05.28
 ******************************************/

#include <QPainter>
#include "dialog.h"
#include <QMainWindow>
#include <QWidget>
#include <stdio.h>
#include <iostream>
#include "mainwindow.h"
#include <QPixmap>
#include <QApplication>
#include <QMouseEvent>
#include "forbidden.h"
#include <QMessageBox>
#include <QFont>

using namespace std;

class ChessWidget : public QWidget {
    Q_OBJECT
public:
        ChessWidget(QWidget *parent=0);
        //void writedata();
protected:
    void paintEvent(QPaintEvent * event); //处理重绘消息
    void mousePressEvent(QMouseEvent * event); //鼠标事件消息处理
private slots://与困难AI沟通的槽
    void Connect();
private:
    int x;
    int y;
signals://发送的几种信号，在mainwindow.cpp中有说明
    void send(bool);
    void additem(int,int,int);
    void win(int,bool);
    void newpoint(int,int);
};

void ClearBoard();
